<?php
//$Id: buddy_api.workflowng.configurations.inc,v 1.2 2008/02/22 08:11:02 nodestroy Exp $

/**
 * @file 
 * This include file implements the default configurations
 */
 
/**
 * Implementation of hook_configuration()
 */
function buddy_api_configuration() {
  $configurations = array (
  'buddy_api_request_accept_mail' => 
  array (
    '#type' => 'configuration',
    '#altered' => false,
    '#event' => 'buddy_request_accept',
    '#label' => '[MAIL] UserB accepts request from UserA',
    '#active' => 1,
    '#module' => t('buddy-api'),
    0 => 
    array (
      '#type' => 'action',
      '#name' => 'workflow_ng_action_mail_to_user',
      '#settings' => 
      array (
        'from' => '[userB:site-mail]',
        'from_args' => 
        array (
          0 => 'userB',
        ),
        'subject' => '[userA:site-name]: [userA:user] has approved your buddylist add request',
        'subject_args' => 
        array (
          0 => 'userA',
        ),
        'message' => 'Hi [userB:user],

[userA:user] has approved your request to join his/her buddylist.

Here\'s a link to your new buddies profile:

  [userA:site-url]/index.php?q=user/[userA:uid]

Enjoy your new freedom!

Regards,
The [userA:site-name] team
',
        'message_args' => 
        array (
          0 => 'userA',
          1 => 'userB',
        ),
      ),
      '#label' => 'Send a mail to a user',
      '#argument map' => 
      array (
        'userB' => 'user',
      ),
    ),
    '#description' => NULL,
    '#attributes' => 
    array (
    ),
    '#required' => false,
    '#tree' => false,
    '#parents' => 
    array (
    ),
    '#recursion' => false,
    '#fixed' => false,
    '#execute' => 'workflow_ng_execute_configuration',
    '#process' => 
    array (
      'workflow_ng_ui_prepare_configuration' => 
      array (
      ),
    ),
    '#_defaults_applied' => true,
    1 => 
    array (
      '#type' => 'action',
      '#name' => 'workflow_ng_action_watchdog',
      '#settings' => 
      array (
        'severity' => '0',
        'type' => 'workflow-ng',
        'message' => 'BUDDYLIST MAIL: [userA:user] ([userA:uid]): [buddyinfo:notification] ([userB:uid])',
        'message_args' => 
        array (
          0 => 'userA',
          1 => 'userB',
          2 => 'buddyinfo',
        ),
        'link' => '',
        'link_args' => 
        array (
        ),
      ),
      '#label' => 'Log to watchdog',
    ),
    '#name' => 'buddy_api_request_accept_mail',
  ),
  'buddy_api_cancel_request' => 
  array (
    '#type' => 'configuration',
    '#altered' => false,
    '#event' => 'buddy_cancel_request',
    '#label' => '[MESSAGE] UserA cancels his own request to UserB',
    '#active' => 1,
    '#module' => t('buddy-api'),
    0 => 
    array (
      '#type' => 'action',
      '#name' => 'workflow_ng_action_drupal_message',
      '#settings' => 
      array (
        'message' => '[buddyinfo:notification]',
        'message_args' => 
        array (
          0 => 'buddyinfo',
        ),
        'error' => 0,
      ),
      '#label' => 'Show a configurable message on the site',
    ),
    '#description' => NULL,
    '#attributes' => 
    array (
    ),
    '#required' => false,
    '#tree' => false,
    '#parents' => 
    array (
    ),
    '#recursion' => false,
    '#fixed' => false,
    '#execute' => 'workflow_ng_execute_configuration',
    '#process' => 
    array (
      'workflow_ng_ui_prepare_configuration' => 
      array (
      ),
    ),
    '#_defaults_applied' => true,
    1 => 
    array (
      '#type' => 'action',
      '#name' => 'workflow_ng_action_watchdog',
      '#settings' => 
      array (
        'severity' => '0',
        'type' => 'workflow-ng',
        'message' => 'BUDDYLIST [userA:user] ([userA:uid]): [buddyinfo:notification] ([userB:uid])',
        'message_args' => 
        array (
          0 => 'userA',
          1 => 'userB',
          2 => 'buddyinfo',
        ),
        'link' => '',
        'link_args' => 
        array (
        ),
      ),
      '#label' => 'Log to watchdog',
    ),
    '#name' => 'buddy_api_cancel_request',
  ),
  'buddy_api_request_deny' => 
  array (
    '#type' => 'configuration',
    '#altered' => false,
    '#event' => 'buddy_request_deny',
    '#label' => '[MESSAGE] UserA denys accept from UserB',
    '#active' => 1,
    '#module' => t('buddy-api'),
    0 => 
    array (
      '#type' => 'action',
      '#name' => 'workflow_ng_action_drupal_message',
      '#settings' => 
      array (
        'message' => '[buddyinfo:notification]',
        'message_args' => 
        array (
          0 => 'buddyinfo',
        ),
        'error' => 0,
      ),
      '#label' => 'Show a configurable message on the site',
    ),
    '#description' => NULL,
    '#attributes' => 
    array (
    ),
    '#required' => false,
    '#tree' => false,
    '#parents' => 
    array (
    ),
    '#recursion' => false,
    '#fixed' => false,
    '#execute' => 'workflow_ng_execute_configuration',
    '#process' => 
    array (
      'workflow_ng_ui_prepare_configuration' => 
      array (
      ),
    ),
    '#_defaults_applied' => true,
    1 => 
    array (
      '#type' => 'action',
      '#name' => 'workflow_ng_action_watchdog',
      '#settings' => 
      array (
        'severity' => '0',
        'type' => 'workflow-ng',
        'message' => 'BUDDYLIST [userA:user] ([userA:uid]): [buddyinfo:notification] ([userB:uid])',
        'message_args' => 
        array (
          0 => 'userA',
          1 => 'userB',
          2 => 'buddyinfo',
        ),
        'link' => '',
        'link_args' => 
        array (
        ),
      ),
      '#label' => 'Log to watchdog',
    ),
    '#name' => 'buddy_api_request_deny',
  ),
  'buddy_api_remove' => 
  array (
    '#type' => 'configuration',
    '#altered' => false,
    '#event' => 'buddy_remove',
    '#label' => '[MESSAGE] UserA deletes UserB from his buddylist',
    '#active' => 1,
    '#module' => t('buddy-api'),
    0 => 
    array (
      '#type' => 'action',
      '#name' => 'workflow_ng_action_drupal_message',
      '#settings' => 
      array (
        'message' => '[buddyinfo:notification]',
        'message_args' => 
        array (
          0 => 'buddyinfo',
        ),
        'error' => 0,
      ),
      '#label' => 'Show a configurable message on the site',
    ),
    '#description' => NULL,
    '#attributes' => 
    array (
    ),
    '#required' => false,
    '#tree' => false,
    '#parents' => 
    array (
    ),
    '#recursion' => false,
    '#fixed' => false,
    '#execute' => 'workflow_ng_execute_configuration',
    '#process' => 
    array (
      'workflow_ng_ui_prepare_configuration' => 
      array (
      ),
    ),
    '#_defaults_applied' => true,
    1 => 
    array (
      '#type' => 'action',
      '#name' => 'workflow_ng_action_watchdog',
      '#settings' => 
      array (
        'severity' => '0',
        'type' => 'workflow-ng',
        'message' => 'BUDDYLIST [userA:user] ([userA:uid]): [buddyinfo:notification] ([userB:uid])',
        'message_args' => 
        array (
          0 => 'userA',
          1 => 'userB',
          2 => 'buddyinfo',
        ),
        'link' => '',
        'link_args' => 
        array (
        ),
      ),
      '#label' => 'Log to watchdog',
    ),
    '#name' => 'buddy_api_remove',
  ),
  'buddy_api_request_accept' => 
  array (
    '#type' => 'configuration',
    '#altered' => false,
    '#event' => 'buddy_request_accept',
    '#label' => '[MESSAGE] UserA accepts request from UserB',
    '#active' => 1,
    '#module' => t('buddy-api'),
    0 => 
    array (
      '#type' => 'action',
      '#name' => 'workflow_ng_action_drupal_message',
      '#settings' => 
      array (
        'message' => '[buddyinfo:notification]',
        'message_args' => 
        array (
          0 => 'buddyinfo',
        ),
        'error' => 0,
      ),
      '#label' => 'Show a configurable message on the site',
    ),
    1 => 
    array (
      '#type' => 'action',
      '#name' => 'workflow_ng_action_watchdog',
      '#settings' => 
      array (
        'severity' => '0',
        'type' => 'workflow-ng',
        'message' => 'BUDDYLIST [userA:user] ([userA:uid]): [buddyinfo:notification] ([userB:uid])',
        'message_args' => 
        array (
          0 => 'userA',
          1 => 'userB',
          2 => 'buddyinfo',
        ),
        'link' => '',
        'link_args' => 
        array (
        ),
      ),
      '#label' => 'Log to watchdog',
    ),
    '#name' => 'buddy_api_request_accept',
  ),
  'buddy_api_add' => 
  array (
    '#type' => 'configuration',
    '#altered' => false,
    '#event' => 'buddy_add',
    '#label' => '[MESSAGE] UserA adds UserB to his buddylist',
    '#active' => 1,
    '#module' => t('buddy-api'),
    0 => 
    array (
      '#type' => 'action',
      '#name' => 'workflow_ng_action_drupal_message',
      '#settings' => 
      array (
        'message' => '[buddyinfo:notification]',
        'message_args' => 
        array (
          0 => 'buddyinfo',
        ),
        'error' => 0,
      ),
      '#label' => 'Show a configurable message on the site',
    ),
    1 => 
    array (
      '#type' => 'action',
      '#name' => 'workflow_ng_action_watchdog',
      '#settings' => 
      array (
        'severity' => '0',
        'type' => 'workflow-ng',
        'message' => 'BUDDYLIST [userA:user] ([userA:uid]): [buddyinfo:notification] ([userB:uid])',
        'message_args' => 
        array (
          0 => 'userA',
          1 => 'userB',
          2 => 'buddyinfo',
        ),
        'link' => '',
        'link_args' => 
        array (
        ),
      ),
      '#label' => 'Log to watchdog',
    ),
    '#name' => 'buddy_api_add',
  ),
  'buddy_api_add_request' => 
  array (
    '#type' => 'configuration',
    '#altered' => false,
    '#event' => 'buddy_add_request',
    '#label' => '[MESSAGE] UserA requests to add UserB',
    '#active' => 1,
    '#module' => t('buddy-api'),
    0 => 
    array (
      '#type' => 'action',
      '#name' => 'workflow_ng_action_drupal_message',
      '#settings' => 
      array (
        'message' => '[buddyinfo:notification]',
        'message_args' => 
        array (
          0 => 'buddyinfo',
        ),
        'error' => 0,
      ),
      '#label' => 'Show a configurable message on the site',
    ),
    '#description' => NULL,
    '#attributes' => 
    array (
    ),
    '#required' => false,
    '#tree' => false,
    '#parents' => 
    array (
    ),
    '#recursion' => false,
    '#fixed' => false,
    '#execute' => 'workflow_ng_execute_configuration',
    '#process' => 
    array (
      'workflow_ng_ui_prepare_configuration' => 
      array (
      ),
    ),
    '#_defaults_applied' => true,
    1 => 
    array (
      '#type' => 'action',
      '#name' => 'workflow_ng_action_watchdog',
      '#settings' => 
      array (
        'severity' => '0',
        'type' => 'workflow-ng',
        'message' => 'BUDDYLIST [userA:user] ([userA:uid]): [buddyinfo:notification] ([userB:uid])',
        'message_args' => 
        array (
          0 => 'userA',
          1 => 'userB',
          2 => 'buddyinfo',
        ),
        'link' => '',
        'link_args' => 
        array (
        ),
      ),
      '#label' => 'Log to watchdog',
    ),
    '#name' => 'buddy_api_add_request',
  ),
  'buddy_api_request_mail' => 
  array (
    '#type' => 'configuration',
    '#altered' => false,
    '#event' => 'buddy_add_request',
    '#label' => '[MAIL] UserA requests to add UserB',
    '#active' => 1,
    '#module' => t('buddy-api'),
    0 => 
    array (
      '#type' => 'action',
      '#name' => 'workflow_ng_action_mail_to_user',
      '#settings' => 
      array (
        'from' => '[userA:site-mail]',
        'from_args' => 
        array (
          0 => 'userA',
        ),
        'subject' => '[userB:site-name]: [userA:user] has requested to add you to his/her buddylist',
        'subject_args' => 
        array (
          0 => 'userA',
          1 => 'userB',
        ),
        'message' => 'Hi [userB:user],

[userA:user] has requested to add you to his/her buddylist.

His message:
*************
[buddyinfo:message]
*************

Here\'s a link to [userA:user]\'s profile:
  [userA:site-url]/index.php?q=user/[userA:uid]

To approve/deny this request, log in to [userB:site-url] and see your pending buddy requests.

Enjoy your new freedom!

Regards,
The [userA:site-name] team',
        'message_args' => 
        array (
          0 => 'userA',
          1 => 'userB',
          2 => 'buddyinfo',
        ),
      ),
      '#label' => 'Send a mail to a user',
      '#argument map' => 
      array (
        'userB' => 'user',
      ),
    ),
    1 => 
    array (
      '#type' => 'action',
      '#name' => 'workflow_ng_action_watchdog',
      '#settings' => 
      array (
        'severity' => '0',
        'type' => 'workflow-ng',
        'message' => 'BUDDYLIST MAIL: [userA:user] ([userA:uid]): [buddyinfo:notification] ([userB:uid])',
        'message_args' => 
        array (
          0 => 'userA',
          1 => 'userB',
          2 => 'buddyinfo',
        ),
        'link' => '',
        'link_args' => 
        array (
        ),
      ),
      '#label' => 'Log to watchdog',
    ),
    '#name' => 'buddy_api_request_mail',
  ),
);
 return $configurations;
}

